package com.xzr.demo.mqserver.mapper;

import com.xzr.demo.mqserver.core.Binding;
import com.xzr.demo.mqserver.core.Exchange;
import com.xzr.demo.mqserver.core.MSGQueue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author：徐志荣
 * @Date：2023/8/4 上午 11:20
 */

@Mapper
public interface MetaMapper {
    // 三个核心建表方法
    void createExchangeTable();
    void createQueueTable();
    void createBindingTable();

    //针对上面基本概念，进行 插入和删除
    void insertExchange(Exchange exchange);
    void deleteExchange(String  exchangeName);
    List<Exchange> selectAllExchanges();

    void insertQueue(MSGQueue queue);
    void deleteQueue(String queueName);
    List<MSGQueue> selectAllQueues();

    void insertBinding(Binding binding);
    void deleteBinding(Binding binding);
    List<Binding> selectAllBindings();









}
